//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "comm\fn_taskHint.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_task", "_status", "_params"];

if (count _this < 1) exitWith {};
DEFAULT_PARAM(_task,0,"");
DEFAULT_PARAM(_status,1,"Created");

_params = switch (true) do {
	case (_status == "created"): {[localize "STR_TMF_TASK_CREATED", [1,1,1,1], "taskNew"]};
	case ((_status == "current") || (_status == "assigned")): {[localize "STR_TMF_TASK_ASSIGNED", [1,1,1,1], "taskCurrent"]};
	case (_status == "succeeded"): {[localize "STR_TMF_TASK_SUCCEEDED", [0.600000,0.839215,0.466666,1.000000], "taskDone"]};
	case (_status == "failed"): {[localize "STR_TMF_TASK_FAILED", [0.972549,0.121568,0.000000,1.000000], "taskFailed"]};
	case (_status == "canceled"): {[localize "STR_TMF_TASK_CANCELED", [0.750000,0.750000,0.750000,1.000000], "taskFailed"]};
};
taskHint [format [(_params select 0) + "\n%1", (taskDescription _task) select 1], (_params select 1), (_params select 2)];

TRACE("End");
TMFPROFILERSTOP;
